package day05;

import java.util.stream.IntStream;

//for循环的演示
public class ForDemo {
    public static void main(String[] args) {
        //1到100的和
        //声明和
        int num =0;
        for (int a=1;a<=100;a++){
            num+=a;
        }
        //int num = IntStream.rangeClosed(1, 100).sum();
        System.out.println("num="+num);
    }
}
